    <div class="container containerShadow">
        <div class="row">
            <div class="topimg">
                <div class="left pull-left">
                    <span>价值评估</span>
                </div>
                <!--<div class="pull-right">
                <a href="###">
                <img src="image/projectDetails/edit.png" >
                </a>
            </div>-->
            </div>
            <form action="" method="post">
                <div class="clearfix">
                    <label for="" class="pull-left">参考资产市场价值</label>
                    <input type="text" class="pull-left" id="reference" onchange="checkNumber('reference')" value="<?= !empty($evaluation['reference'])?$evaluation['reference']:'';?>"/>
                    <label for="" class="pull-left">回现保守</label>
                    <input type="text" class="pull-left" id="conservation"  onchange="checkNumber('conservation')"    value="<?= !empty($evaluation['conservation'])?$evaluation['conservation']:'';?>" />
                    <label for="" class="pull-left">回现激进</label>
                    <input type="text" class="pull-right" id="radical"   onchange="checkNumber('radical')"   value="<?= !empty($evaluation['radical'])?$evaluation['radical']:'';?>" />
                </div>
                <div class="clearfix">
                    <label for="" class="pull-left">回收预评估价值说明</label>
                    <textarea name="" rows="" cols="" id="recall"  class="pull-right textarea-edit5"><?= !empty($evaluation['recall'])?$evaluation['recall']:'';?></textarea>
                </div>
                <div class="cancelInConfirm">
                    <!--<input id="confirm" type="submit" value="保存"/>-->
                    <input id="ajaxEvaluation" class="cancelInConfirmActive" type="button" value="保存" />
                    <input id='cancel' type="button" value="取消" />
                </div>

            </form>

        </div>
    </div>
    
    
    <!-- textarea 高度设置对比div -->
	
	<div style="max-height: 1px; overflow: hidden;">
		
		<div id="d5" style="visibility:hidden;min-height: 80px!important;"></div>
	
	</div>

<script>
    $(function () {
        var reference = ''; //
        var conservation = ''; //
        var radical = ''; //
        var recall = ''; //
        var data = {};
        $("#ajaxEvaluation").click(function () {
            reference = $("#reference").val();
            conservation = $("#conservation").val();
            radical = $("#radical").val();
            recall = $("#recall").val();
            data = {
                'reference':reference,
                'conservation':conservation,
                'radical':radical,
                'recall':recall,
                'project_id':project_id,
                'package_id':package_id,
            }
            $.post('/project/ajax-save-evaluation-project',{'data':data},function (res) {
                var JSONData = JSON.parse(res)
                if (JSONData.code == 200){
                    layer.msg(JSONData.message);
                    pingGuW();
                }else{
                    layer.msg(JSONData.message);
                }
            })
        })
        //-----------------渲染无编辑页面--------------------
        function pingGuW() {
            $.get('/project/get-base-data',{'project_id':project_id,'postion':6},function (res) {
                $(".jiaZhiPingGuW").children().remove();
                $(".jiaZhiPingGuW").html(res);
                $(".jiaZhiPingGuEdit").children().remove();
                $(".jiaZhiPingGuW").show();
            })
        }
        //---取消按钮
        $("#cancel").click(function () {
            $.post('/project/ajax-un-lock',{'postion':6,'project_id':project_id},function (res) {
                var JSONData = JSON.parse(res)
                if (JSONData.code == 200){
                    layer.msg(JSONData.message);
                }else{
                    layer.msg(JSONData.message);
                }
            })
            $(".jiaZhiPingGuEdit").hide();
            $(".jiaZhiPingGuW").show();
        })
        $("#conservation,#radical").keyup(function(){
            var c=$(this);
            var value_number = c.val();
            var value_number_test = value_number.replace(/,/ig,'');
            var value_number_test = value_number_test.replace(/./ig,'');
            if(/[^\d]/.test(value_number_test)){//替换非数字字符
                $("#ajaxEvaluation").attr('disabled','true');
                c.prev().find("p").empty("");
                c.prev().append("<p style='color: red'>填写数字</p>")
            }else{
                $("#ajaxEvaluation").removeAttr('disabled');
                c.prev().find("p").empty("");
            }
        })
    })

    function checkNumber(str){
        var c=$('#'+str);
        var value_number = c.val();
        var value_number_test = value_number.replace(/,/ig,'');
        var value_number_test = value_number_test.replace(/\./ig,'');
        if(/[^\d]/.test(value_number_test)){//替换非数字字符
            $("#ajaxEvaluation").attr('disabled','true');
            c.prev().find("p").empty("");
            c.prev().append("<p style='color: red'>填写数字</p>")
        }else{
            $("#ajaxEvaluation").removeAttr('disabled');
            c.prev().find("p").empty("");
        }
    }

    
     //textarea编辑高度和输入框高亮显示功能开始
	var listArr = ['input']
	listArr.forEach(function(value,index,arr){
		$(value).focus(function(){
			$(this).css({
					"border":"1px solid #2194f1"
			})
		})
		$(value).blur(function(){
			$(this).css({
					"border":"1px solid #e2e2e2"
			})
		})
	})
	  // textarea 高度展示问题和高亮显示开始
	  $(document).on('focus','.textarea-edit5',function(){
	 	textareaHeight(this);
	 	$(this).css({
				"border":"1px solid #2194f1"
		})
	 })
	   $(document).on('blur','.textarea-edit5',function(){
	 	$(this).css({
				"border":"1px solid #e2e2e2"
		})
	 })
	  $(document).on('keyup','.textarea-edit5',function(){
     	textareaHeight(this);
     })
     // textarea 高度展示问题和高亮显示结束
     
      function textareaHeight(th){
    	 var val = $(th).val();
	      $("#d5").width($(th).width())
	      $("#d5").html("<pre>" +val+" "+"</pre>");
	      var h = $("#d5").height() ;
		      $(th).height(h);
	}
    
</script>